#!/bin/python

def median(mylist):
	sorts = sorted(mylist)
	length = len(sorts)
	if not length % 2:
		return (sorts[length / 2] + sorts[length / 2 - 1]) / 2.0
	return sorts[length / 2]

f = open('allfloats.txt', 'r')
    
num = float(0)
count = float(0)
mylist = []

for line in f:
	count = count + 1
	num += float(line)
	mylist.append(float(line))

print( num / count)
print(median(mylist))